package com.zut.pojo;


import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * 返回分页的信息
 * @author: Mr.Liu
 * @create: 2021-11-25 09:46
 */
@Data
public class MyPage<T> implements Serializable {

    /**
     * 每页显示条数
     */
    private Integer size = 7;

    /**
     * 当前页
     */
    private Integer current;

    /**
     * 当前页的数据
     */
    private List<T> records;

    /**
     * 数据总数
     */
    private Long total;

    /**
     * 总页数
     */
    private Long pages;

    public MyPage() {
    }

    public MyPage(Integer current,Long total, Long pages, List<T> records) {
        this.current = current;
        this.pages = pages;
        this.records = records;
        this.total = total;
    }
}
